//浏览记录listview
import React, { Component } from 'react'
import {
    View,
    Text,
    Image,
    TouchableOpacity,
} from 'react-native';

import { browseStyle as styles } from '../../../../styles';
import fmt from '../../../util/fmtDateUtil';
var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;
var height = Dimensions.get('window').height;

export default class Browse_list extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <TouchableOpacity
                style={styles.bro_all} activeOpacity={1}
                onPress={() => { this.goGet('Postionin', this.props.postionBrowse.postionId); }}
            >
                <Image source={require('../../../img/app/company.png')} style={styles.head} />
                <View style={[styles.bro_right, { width: width * 0.8 }]}>
                    <Text style={styles.bro_text1}>{this.props.postionBrowse.postionName}</Text>
                    <Text style={styles.bro_text2}>{this.props.postionBrowse.companyName}</Text>
                    <Text style={styles.bro_time}>{fmt(this.props.postionBrowse.browseTime, 'yyyy-MM-dd')}</Text>
                </View>
            </TouchableOpacity>
        )
    }
    goGet(name, id) {
        this.props.navigation.navigate(name, { useId: id });
    }
}